import request from "@/utils/request";

// 创建请假申请
export function createLeave(data) {
  return request({
    url: "/flowable/leave/create",
    method: "post",
    data: data,
  });
}

// 获得请假申请
export function getLeave(id) {
  return request({ url: "/flowable/leave/get?id=" + id, method: "get" });
}

// 获得请假申请分页
export function getLeavePage(query) {
  return request({ url: "/flowable/leave/page", method: "get", params: query });
}

export function apply(userId,businessId,tablename,processDefinitionKey) {
  return request({ url: `/flowable/instance/createProcessInstance?userId=${userId}&businessId=${businessId}&tablename=${tablename}&processDefinitionKey=${processDefinitionKey}`,
     method: "get" });
}



